Skip to content

Conversation

@mgyucht
Copy link
Contributor

@mgyucht mgyucht commented Oct 14, 2025

What changes are proposed in this pull request?

The unit tests for the FilesExt module are very slow because they exercise the retry pathway using a real clock, resulting in long periods spent waiting for retries. For unit tests, this is not necessary; they can use the clock provided in the Config, which is a RealClock by default in production but can be mocked in tests using FakeClock.

To fix this, I changed the call of retried to use the config's clock, and then I updated the mock Config we provide as a fixture to use the fake clock.

How is this tested?

Existing tests should continue to work & pass.
Unit tests should be substantially faster than before.

NO_CHANGELOG=true

@mgyucht mgyucht temporarily deployed to test-trigger-is October 14, 2025 13:25 — with GitHub Actions Inactive
@mgyucht mgyucht changed the title Fix slow unit tests for files Fix slow unit tests for FilesExt Oct 14, 2025
@mgyucht mgyucht temporarily deployed to test-trigger-is October 14, 2025 13:26 — with GitHub Actions Inactive
@mgyucht mgyucht temporarily deployed to test-trigger-is October 14, 2025 14:07 — with GitHub Actions Inactive
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1074
  • Commit SHA: a66775bf2bbc99bf05a8cf4d6ba639843d5b3dd2

Checks will be approved automatically on success.

@mgyucht mgyucht temporarily deployed to test-trigger-is October 14, 2025 14:08 — with GitHub Actions Inactive
@mgyucht mgyucht enabled auto-merge October 14, 2025 14:14
@mgyucht mgyucht added this pull request to the merge queue Oct 14, 2025
Merged via the queue into main with commit 1afb909 Oct 14, 2025
17 checks passed
@mgyucht mgyucht deleted the fix-slow-tests branch October 14, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants